package com.orange.wwwapi.pojo.rsp.carpark.keytop;

import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class KeyTopBaseRsp<T> {

    /**
     * 响应代码 0=成功，其他失败，详见返回码枚举
     */
    private String resCode;
    /**
     * 响应消息
     */
    private String resMsg;

    /**
     * 响应内容
     */
    private T data;

    public T check() {
        if ("0".equals(resCode)) {
            return data;
        }
        throw new RuntimeException(resMsg);
    }
}
